from pydantic import BaseModel
from typing import Optional

class SendRequest(BaseModel):
    """
    发送邮件的请求模型（JSON 场景备用，当前接口采用表单）
    """
    to: str
    subject: str
    body: str
    body_type: Optional[str] = "Text"
    from_email: Optional[str] = None
    attachments: Optional[list] = None

class Attachment(BaseModel):
    """
    附件模型（JSON 场景备用）
    """
    path: Optional[str] = None
    name: Optional[str] = None
    content_type: Optional[str] = None
    content_base64: Optional[str] = None

class CallbackUrlRequest(BaseModel):
    """
    OAuth 回调 URL 请求体模型
    """
    url: str

